#ifndef  __NB_H
#define  __NB_H

//----------------------------------Include-------------------------------------
#include  <stdint.h>
//------------------------------------------------------------------------------

//-----------------------------------Macro--------------------------------------
#define NB_ERR_COM                  (0x01)
#define NB_ERR_SIM                  (0x02)
#define NB_ERR_ANTENNA              (0x04)
#define NB_ERR_REG                  (0x08)
#define NB_ERR_CFG                  (0x10)
#define NB_ERR_SOCKET               (0x20)
#define NB_ERR_CLOSED               (0x40)
//------------------------------------------------------------------------------

//------------------------------------Type--------------------------------------
typedef struct{
  uint16_t   stauts;
  uint8_t    csq;
  uint8_t    done;
}t_nb;
//------------------------------------------------------------------------------

//---------------------------------Share Var------------------------------------
#ifdef  NB_GLOBALS
#else
extern t_nb                        gt_nb;
#endif
//------------------------------------------------------------------------------

//--------------------------------Extern Func-----------------------------------
//------------------------------------------------------------------------------

//----------------------------------Declare-------------------------------------
void     it_nb_rcv_one_byte(unsigned char c);
void     it_nb_rcv_done(void);
//------------------------------------------------------------------------------
void     nb_tx(uint8_t* p, uint32_t len);
void     nb_reset(void);
void     nb_init(void);
void     nb_close(void);
void     nb_cyc(void);
//------------------------------------------------------------------------------

#endif
//------------------------------------EOF---------------------------------------








